package action.chap5;

import java.util.Arrays;
import java.util.List;

/**
 * @ClassName Demo512
 * @Description Demo512
 * @Author 孙峰
 * @Date 2020/4/1 17:01
 * @Version 1.0
 */
public class Demo512 {
    public static void main(String[] args) {
        List<Integer> integerList = Arrays.asList(1, 2, 1, 3, 2, 4);
        // 筛选有filter distinct
        // 截断流limit
        integerList.stream()
                .filter(integer -> integer % 2 == 0)
                .distinct()
                .forEach(System.out::println);
    }
}
